<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <!-- <meta charset="gb2312"> -->
    
    <meta name="author" content="">

    <meta name="Keywords" content="">
    <meta name="description" content="">
    
    <!-- 启用360浏览器的极速模式(webkit)-->
        <meta name="renderer" content="webkit">          
        <!-- 避免IE使用兼容模式 -->
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
    
    <!-- mobile -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no" />
    
    <link rel="shortcut icon" href="favicon.ico" type="images/x-icon" />
    <link rel="bookmark" href="favicon.ico" />
    
    <title>金塔珠宝</title>
    <!--[if lt IE 9 ]>
            <script src="js/hack/html5shiv.js"></script>
        <![endif]-->
<!--        <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>-->
        
<!--         <script src="http://192.168.1.106:8008/con/assets/js/f5.js"></script> -->
        

    <link rel="stylesheet" href="../Public/css/base.css">
    <link rel="stylesheet" href="../Public/css/common.css">
    <link rel="stylesheet" href="../Public/css/page.css">
    <link rel="stylesheet" href="../Public/css/font.css">
        <link rel="stylesheet" href="../Public/css/responsive.css">
        
        
  </head>
  <body>
        <!-- nav [[ -->
<include file="Common:header"/>
    <!-- nav ]] -->

    <!-- header [[ -->
 <!--        <header class="header">
            <div class="title">
                <div class="bg">
                    <span class="icon"></span>
                    <span class="txt">用户登陆</span>
                </div>
            </div>
        </header> -->
    <!-- header ]] -->
        
        <!-- content [[ -->
        <div class="mod_form">
            <form action="#">
                <dl class="form_wrap">
                    <dt>注册账号</dt>
                    <dd>
                        <input class="name" id="phone" type="text" value="" name="phone" placeholder="手机号/邮箱">
                        <span class="hint none">首个为字母</span>
                    </dd>
                    <dt>昵称</dt>
                    <dd>
                        <input class="email" id="user" type="text" value="" name="user" placeholder="昵称">
                        <span class="hint">昵称</span>
                    </dd>
                    <dt>密码</dt>
                    <dd>
                        <input class="pwd" id="pass" type="password" name="pass" placeholder="密码至少六位">
                        <span class="hint">密码6-16位</span>
                    </dd>
                    <dt>确认密码</dt>
                    <dd>
                        <input class="pwd" id="confirmpassword" type="password" name="confirmpassword" placeholder="请确认密码">
                        <span class="hint">密码6-16位</span>
                    </dd>
                    <dd class=""><input class="mod_btn btn" id="submit" type="submit" value="立即注册"></dd>
                    <dd class="login_signin">
                        已经有账号，直接&nbsp;&nbsp;
                        <a href="{:U('User/login')}" class="link">登陆</a>
                    </dd>
                </dl>
            </form>
        </div>

        <!-- content ]] -->
        
        <!-- footer [[ -->
<include file="Common:footer"/>
<script type="text/javascript" src="../Public/layer/layer.js"></script>
  <script>
 $(function(){
$('#submit').click(function(){
var phone=$('#phone').val();
var user=$('#user').val();
var pass=$('#pass').val();
var confirmpassword=$('#confirmpassword').val();
 if(phone==''){
         layer.msg("请输入账号",{time:1000});
        return false;
    }
    if(user==''){
         layer.msg("请输入昵称",{time:1000});
        return false;
    }
    if(pass==''){
         layer.msg("请输入密码",{time:1000});
        return false;
    }
     if(pass.length<6){
         layer.msg("密码至少6位",{time:1000});
        return false;
    }
     if(pass!=confirmpassword){
         layer.msg("密码不一致",{time:1000});
        return false;
    }

          $.ajax({
                            url:'{:U("User/register")}',
                            type:'post',
                            data:{
                                'phone':phone,
                                'user':user,
                                'pass':pass
                            },
                            dataType:'json',
                            success:function(reslut){

                                if(reslut.status==0){
                                    layer.msg("账号已注册",{time:1000});
                                }else if(reslut.status==1){
                                    layer.msg("注册成功,待审核",{time:1000},function(){
                        window.location.href=reslut.url;

                    });
                                    
                                }
                                else{
                                    layer.msg("注册失败",{time:1000});
                                }
                            }
                        })
                  return false;
})






 })



  </script>      
  </body>
</html>